package bento.views.pnls;

import javax.swing.JPanel;
import javax.swing.JSplitPane;
import java.awt.BorderLayout;
import javax.swing.border.TitledBorder;
import javax.swing.JCheckBox;
import javax.swing.JTextField;
import javax.swing.UIManager;
import bento.layout.WrapLayout;
import javax.swing.JScrollPane;
import javax.swing.JList;
import javax.swing.BoxLayout;
import java.awt.GridLayout;
import java.awt.FlowLayout;
import javax.swing.AbstractListModel;
import javax.swing.border.EtchedBorder;
import javax.swing.JLabel;
import javax.swing.JTextArea;
import javax.swing.border.EmptyBorder;
import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.layout.RowSpec;
import com.jgoodies.forms.factories.FormFactory;
import javax.swing.JButton;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;

public class PnlBentos extends JPanel {
    private JTextField textField;
    private JTextField textField_1;
    private JTable table;

    /**
     * Create the panel.
     */
    public PnlBentos() {
        setLayout(new BorderLayout(5, 0));
        
        JSplitPane splitPane_1 = new JSplitPane();
        splitPane_1.setOneTouchExpandable(true);
        add(splitPane_1, BorderLayout.CENTER);
        
        JPanel panel = new JPanel();
        splitPane_1.setLeftComponent(panel);
        panel.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Stores Name", TitledBorder.LEADING, TitledBorder.TOP, null, null));
        panel.setLayout(new FormLayout(new ColumnSpec[] {
                ColumnSpec.decode("max(125px;default):grow"),},
            new RowSpec[] {
                RowSpec.decode("fill:default:grow"),}));
        
        JScrollPane scrollPane = new JScrollPane();
        panel.add(scrollPane, "1, 1, fill, fill");
        
        JList list = new JList();
        list.setModel(new AbstractListModel() {
            String[] values = new String[] {"1", "2", "23"};
            public int getSize() {
                return values.length;
            }
            public Object getElementAt(int index) {
                return values[index];
            }
        });
        scrollPane.setViewportView(list);
        
        JPanel panel_1 = new JPanel();
        splitPane_1.setRightComponent(panel_1);
        panel_1.setBorder(new TitledBorder(null, "Bentos", TitledBorder.LEADING, TitledBorder.TOP, null, null));
        panel_1.setLayout(new BorderLayout(0, 0));
        
        JPanel panel_6 = new JPanel();
        panel_1.add(panel_6, BorderLayout.CENTER);
        panel_6.setLayout(new BorderLayout(0, 0));
        
        JScrollPane scrollPane_1 = new JScrollPane();
        panel_6.add(scrollPane_1, BorderLayout.CENTER);
        
        table = new JTable();
        table.setModel(new DefaultTableModel(
            new Object[][] {
            },
            new String[] {
                "Name", "Unit Price"
            }
        ));
        scrollPane_1.setViewportView(table);
        
        JPanel panel_8 = new JPanel();
        panel_6.add(panel_8, BorderLayout.EAST);
        panel_8.setLayout(new FormLayout(new ColumnSpec[] {
                FormFactory.DEFAULT_COLSPEC,},
            new RowSpec[] {
                FormFactory.DEFAULT_ROWSPEC,
                FormFactory.DEFAULT_ROWSPEC,}));
        
        JButton button_2 = new JButton("+");
        panel_8.add(button_2, "1, 1");
        
        JButton button_3 = new JButton("-");
        panel_8.add(button_3, "1, 2");
        
        JPanel panel_7 = new JPanel();
        panel_1.add(panel_7, BorderLayout.SOUTH);
        panel_7.setLayout(new BorderLayout(0, 0));
        
        JButton button = new JButton("Refresh");
        panel_7.add(button, BorderLayout.CENTER);
        
        JButton button_1 = new JButton("Commit");
        panel_7.add(button_1, BorderLayout.EAST);
        
        JPanel panel_2 = new JPanel();
        panel_2.setBorder(new TitledBorder(null, "Filter", TitledBorder.LEADING, TitledBorder.TOP, null, null));
        add(panel_2, BorderLayout.EAST);
        panel_2.setLayout(new BorderLayout(0, 0));
        
        JPanel panel_3 = new JPanel();
        panel_2.add(panel_3, BorderLayout.NORTH);
        panel_3.setLayout(new BoxLayout(panel_3, BoxLayout.Y_AXIS));
        
        JPanel panel_4 = new JPanel();
        panel_4.setBorder(new TitledBorder(null, "Name", TitledBorder.LEADING, TitledBorder.TOP, null, null));
        panel_3.add(panel_4);
        
        JCheckBox checkBox = new JCheckBox("");
        panel_4.add(checkBox);
        
        textField = new JTextField();
        textField.setColumns(10);
        panel_4.add(textField);
        
        JPanel panel_5 = new JPanel();
        panel_5.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Tel", TitledBorder.LEADING, TitledBorder.TOP, null, null));
        panel_3.add(panel_5);
        
        JCheckBox checkBox_1 = new JCheckBox("");
        panel_5.add(checkBox_1);
        
        textField_1 = new JTextField();
        textField_1.setColumns(10);
        panel_5.add(textField_1);

    }

}
